package cn.kgc.ssm.controller;

import cn.kgc.ssm.response.ResponseResult;
import cn.kgc.ssm.service.EchartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 课工场
 * @date 2024/11/23
 * @description   图形报表控制层
 */
@RestController
@RequestMapping("echarts")
public class EchartsController {

    @Autowired
    private EchartsService echartsService;

    @GetMapping("dashboard")
    public ResponseResult dashboardData(){

        return    echartsService.dashboardData();
    }


    //折线图
    @GetMapping("lineData")
    public ResponseResult lineData(){

        return    echartsService.lineData();
    }

    // 饼图
    @GetMapping("rose")
    public ResponseResult roseData(){

        return    echartsService.roseData();
    }

}
